package com.ljc.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ljc.model.dto.UpdateUserInterfaceInfoDTO;
import com.ljc.model.entity.UserInterfaceInfo;
import com.ljc.model.vo.UserInterfaceInfoVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 *
 */
public interface UserInterfaceInfoService extends IService<UserInterfaceInfo> {
    void validUserInterfaceInfo(UserInterfaceInfo userInterfaceInfo, boolean add);

    /**
     * 调用接口统计
     */
    boolean invokeCount(long interfaceInfoId, long userId);

    /**
     * 根据Id获取某个用户拥有的接口信息
     */
    List<UserInterfaceInfoVO> getInterfaceInfoByUserId(Long userId, HttpServletRequest request);

    /**
     * 更新用户接口信息
     */
    boolean updateUserInterfaceInfo(UpdateUserInterfaceInfoDTO updateUserInterfaceInfoDTO);

    /**
     * 检验用户是否有调用次数
     */
    boolean checkUserInvokeAuth(Long userId, Long interfaceInfoId);
}
